| Conditions | 2 |
| Total Lines | 21 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import React, { Component } from "react" |
||
| 27 | |||
| 28 | render() { |
||
| 29 | const { lazyload, regNumber, title, className } = this.props |
||
| 30 | const logoSourceUrl = this.getLogoImageSrcUrl(regNumber) |
||
| 31 | const image = ( |
||
| 32 | <img |
||
| 33 | src={logoSourceUrl} |
||
| 34 | role="presentation" |
||
| 35 | onError={({ target }) => { |
||
| 36 | target.onerror = null |
||
| 37 | target.src = defaultLogo |
||
| 38 | }} |
||
| 39 | alt={title} |
||
| 40 | className={className} |
||
| 41 | /> |
||
| 42 | ) |
||
| 43 | |||
| 44 | if (lazyload === true) { |
||
| 45 | return <LazyLoad debounce={false}>{image}</LazyLoad> |
||
| 46 | } else { |
||
| 47 | return image |
||
| 48 | } |
||
| 84 |